home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / man / subst.man < prev   
Text File  |  1989-06-28  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.      SSSSUUUUBBBBSSSSTTTT((((1111))))             XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))              SSSSUUUUBBBBSSSSTTTT((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           subst - substitute definitions into file(s)
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           ssssuuuubbbbsssstttt ----ffff substitutions victim ...
  13.  
  14.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.           _S_u_b_s_t makes substitutions into files, in a way that is
  16.           suitable for customizing software to local conditions.  Each
  17.           _v_i_c_t_i_m file is altered according to the contents of the
  18.           _s_u_b_s_t_i_t_u_t_i_o_n_s file.
  19.  
  20.           The _s_u_b_s_t_i_t_u_t_i_o_n_s file contains one line per substitution.
  21.           A line consists of two fields separated by one or more tabs.
  22.           The first field is the _n_a_m_e of the substitution, the second
  23.           is the _v_a_l_u_e.  Neither should contain the character `#'.  A
  24.           line starting with `#' is a comment and is ignored.
  25.  
  26.           In the _v_i_c_t_i_ms, each line on which a substitution is to be
  27.           made (a _t_a_r_g_e_t line) must be preceded by a _p_r_o_t_o_t_y_p_e line.
  28.           The prototype line should be delimited in such a way that it
  29.           will be taken as a comment by whatever program processes the
  30.           file later.  The prototype line must contain a ``prototype''
  31.           of the target line bracketed by `=()<' and `>()=';
  32.           everything else on the prototype line is ignored.  _S_u_b_s_t
  33.           extracts the prototype, changes all instances of
  34.           substitution names bracketed by `@<' and `>@' to their
  35.           values, and then replaces the target line with the result.
  36.  
  37.      EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  38.           If the _s_u_b_s_t_i_t_u_t_i_o_n_s file is
  39.  
  40.                FIRST     111
  41.                SECOND    222
  42.  
  43.           and the _v_i_c_t_i_m file is
  44.  
  45.                x = 2;
  46.                /* =()<y = @<FIRST>@ + @<SECOND>@;>()= */
  47.                y = 88 + 99;
  48.                z = 5;
  49.  
  50.           then ``ssssuuuubbbbsssstttt ----ffff _s_u_b_s_t_i_t_u_t_i_o_n_s _v_i_c_t_i_m'' changes _v_i_c_t_i_m to:
  51.  
  52.                x = 2;
  53.                /* =()<y = @<FIRST>@ + @<SECOND>@;>()= */
  54.                y = 111 + 222;
  55.                z = 5;
  56.  
  57.      FFFFIIIILLLLEEEESSSS
  58.           n._v_i_c_t_i_m    new version being built
  59.           o._v_i_c_t_i_m    old version during renaming
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 6/29/89)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      SSSSUUUUBBBBSSSSTTTT((((1111))))             XXXXEEEENNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))              SSSSUUUUBBBBSSSSTTTT((((1111))))
  71.  
  72.  
  73.  
  74.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.           sed(1)
  76.  
  77.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  78.           Complains and halts if it is unable to create its temporary
  79.           files or if they already exist.
  80.  
  81.      HHHHIIIISSSSTTTTOOOORRRRYYYY
  82.           Written at U of Toronto by Henry Spencer.
  83.  
  84.      BBBBUUUUGGGGSSSS
  85.           When creating a file to be _s_u_b_s_ted, it's easy to forget to
  86.           insert a dummy target line after a prototype line; if you
  87.           forget, _s_u_b_s_t ends up deleting whichever line did in fact
  88.           follow the prototype line.
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 6/29/89)
  130.  
  131.  
  132.  
  133.